package com.ask.clonedemo;

public class Circle implements Cloneable{
    int radius;
    Point center;

    Circle(int radius, Point center){
        this.radius = radius;
        this.center = center;
    }

//    @Override
//    protected Object clone() throws CloneNotSupportedException{
//        return super.clone();
//    }

    @Override
    protected Object clone() throws CloneNotSupportedException{
        Circle cloned = (Circle) super.clone();
        cloned.center = this.center.clone();
        return cloned;
    }

}
